#! /usr/bin/python

target = 2000000
pDiff = target

def numOfRect(X, Y):
 s = 0
 for i in range(1, X+1):
    for j in range(1, Y+1):
	s = s + (X-i+1)*(Y-j+1)
 return s

rx = 0
ry = 0
for x in range(100):
    for y in range(100):
	diff = target - numOfRect(x, y)
        if diff < 0: 
	   print pDiff, rx*ry
	   break
	if diff < pDiff: 
	   pDiff = diff
	   rx = x
	   ry = y

